package com.momo.mapper.mapper;

import com.momo.mapper.dataobject.ItemDO;
import org.apache.ibatis.annotations.Param;

/**
 * 由于需要对分页支持,请直接使用对应的DAO类
 * 注意:此结构有系统生成,禁止手工修改,以免被覆盖,请通过dalgen生成
 * The Table ITEM.
 * ITEM
 */
public interface ItemDOMapper{

    /**
     * desc:插入表:ITEM.<br/>
     * descSql =  SELECT LAST_INSERT_ID() INSERT INTO ITEM( TITLE ,IMG_URL ,DESCRIPTION ,SALES ,PRICE )VALUES( #{title,jdbcType=VARCHAR} ,#{imgUrl,jdbcType=VARCHAR} ,#{description,jdbcType=VARCHAR} ,#{sales,jdbcType=INTEGER} ,#{price,jdbcType=DECIMAL} )
     * @param entity entity
     * @return int
     */
    int insert(ItemDO entity);
    /**
     * desc:更新表:ITEM.<br/>
     * descSql =  UPDATE ITEM SET TITLE = #{title,jdbcType=VARCHAR} ,IMG_URL = #{imgUrl,jdbcType=VARCHAR} ,DESCRIPTION = #{description,jdbcType=VARCHAR} ,SALES = #{sales,jdbcType=INTEGER} ,PRICE = #{price,jdbcType=DECIMAL} WHERE ID = #{id,jdbcType=INTEGER}
     * @param entity entity
     * @return int
     */
    int update(ItemDO entity);
    /**
     * desc:根据主键删除数据:ITEM.<br/>
     * descSql =  DELETE FROM ITEM WHERE ID = #{id,jdbcType=INTEGER}
     * @param id id
     * @return int
     */
    int deleteById(Integer id);
    /**
     * desc:根据主键获取数据:ITEM.<br/>
     * descSql =  SELECT * FROM ITEM WHERE ID = #{id,jdbcType=INTEGER}
     * @param id id
     * @return ItemDO
     */
    ItemDO getById(Integer id);
}
